cc.Class({
    extends: cc.Component,
    properties: {
        image: cc.Node,
        all: cc.Node,
        redPoint: cc.Node
    },
    init: function (t) {
        this.manager = t, this.all.active = !1;
    },
    change: function () {
        switch (this.callback = null, this.manager.state) {
            case "open":
                this.image.scaleX = -1, this.all.active = !0, this.redPoint.active = !1;
                break;

            case "close":
                this.image.scaleX = 1, this.all.active = !1;
        }
    },
    event: function () {
        var t = this;
        switch (this.manager.state) {
            case "open":
                this.manager.hide({
                    callback: function () {
                        t.change();
                    }
                });
                break;

            case "close":
                this.manager.show({
                    callback: function () {
                        t.change();
                    }
                });
        }
    }
})